// COPYRIGHT © 2020 Esri
//
// All rights reserved under the copyright laws of the United States
// and applicable international laws, treaties, and conventions.
//
// This material is licensed for use under the Esri Master License
// Agreement (MLA), and is bound by the terms of that agreement.
// You may redistribute and use this code without modification,
// provided you adhere to the terms of the MLA and include this
// copyright notice.
//
// See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
//
// For additional information, contact:
// Environmental Systems Research Institute, Inc.
// Attn: Contracts and Legal Services Department
// 380 New York Street
// Redlands, California, USA 92373
// USA
//
// email: contracts@esri.com
//
// See http://js.arcgis.com/3.34/esri/copyright.txt for details.

define(["require","exports"],(function(r,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=void 0;var e=function(){function r(){this.errors=[],this.tolerant=!1}return r.prototype.recordError=function(r){this.errors.push(r)},r.prototype.tolerate=function(r){if(!this.tolerant)throw r;this.recordError(r)},r.prototype.constructError=function(r,t){var e=new Error(r);try{throw e}catch(r){Object.create&&Object.defineProperty&&(e=Object.create(r),Object.defineProperty(e,"column",{value:t}))}return e},r.prototype.createError=function(r,t,e,o){var n="Line "+t+": "+o,i=this.constructError(n,e);return i.index=r,i.lineNumber=t,i.description=o,i},r.prototype.throwError=function(r,t,e,o){throw this.createError(r,t,e,o)},r.prototype.tolerateError=function(r,t,e,o){var n=this.createError(r,t,e,o);if(!this.tolerant)throw n;this.recordError(n)},r}();t.ErrorHandler=e}));